import React, { Component } from 'react'
import LifeCycle from './components/LifeCycle'

export default class App extends Component {
  state={
    isshow:true
  }
  render() {
    return (
      <div>
         <button onClick={()=>this.setState({isshow:!this.state.isshow})}>switch</button>
         {
          this.state.isshow?<LifeCycle></LifeCycle>:<></>
         }
      </div>
    )
  }
}
